package com.ming.Bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author:weiming
 * @Date:2020/11/15
 */

@Component
public class MyBean {

    /**
     * @Value 注入配置文件自定义属性值
     */
    @Value("${zwm.name}")
    private String name;

    private String title;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
